home *** CD-ROM | disk | FTP | other *** search
- /**
- -- File: GX Scrolling (main).h
- --
- -- Comments: This header file contains the prototypes, constants, and type definitions
- -- used by "GX Scrolling (main).c" file.
- --
- -- Version: 1.0 1/93
- -- => added general GX support & scrolling
- --
- --
- -- Components: GX Scrolling (main).c
- -- GX Scrolling (main).h
- -- GX Scrolling Controls.c
- -- GX Scrolling Controls.h
- -- GX Scrolling (main).π.rsrc
- --
- --
- -- Notes: 1) Print this file in landscape for the best results
- -- 2) If you are using THINK C v5.x, I have added markers to navigate the
- -- code.
- -- 3) This code was adapted and simplyified from the "DTS AE Skeleton" sample.
- --
- -- Author: Pete "Luke" Alexander
- -- Developer Technical Support
- -- AppleLink: DEVSUPPORT
- --
- --
- -- ©1992 - 1993 Apple Computer, Inc.
- -- All rights reserved.
- --
- **/
-
-
- /***** External Prototype (needed in GX Scrolling Controls.c) *****/
- extern void DrawWindow(WindowPtr theWindow);
-
-
- /***** Type Definitions *****/
- typedef struct MyWindowRecord /* Tack storage onto the end of the WindowRecord */
- {
- WindowRecord window;
- PicHandle picture; /* PICT to display in window */
- Rect documentBoundsRect;
- Point origin; /* location of upper left corner of picture in window (local) */
- ControlHandle hScrollBar; /* Handle to horizontal scroll bar */
- ControlHandle vScrollBar; /* Handle to vertical scroll bar */
- } MyWindowRecord, *MyWindowPeek;
-
-
- /***** Constants *****/
- enum
- {
- kDriverType = 'DRVR', /* Resource Types */
- kPictureType = 'PICT',
-
- kScrollBarWidth = 16, /* Constants */
- kMinWindowWidth = 100,
- kMinWindowHeight = 75,
- kTitleBarHeight = 19,
- kNewWindowOffset = 1+kTitleBarHeight,
- kMinimumDocumentSize = 64,
-
- rMenuBar = 1000, /* Menu bar */
-
- mApple = 1000, /* Menus */
- iAbout = 1,
-
- mFile = 1001,
- iNew = 1,
- iOpen = 2,
- iClose = 3,
- iSave = 5,
- iSaveAs = 6,
- iPrintOneCopy = 8,
- iDocumentSetup = 9,
- iPageSetup = 10,
- iPrint = 11,
- iQuit = 13,
-
- rAboutBox = 1000, /* Alerts */
- rFatalErrorAlert = 1001,
- rNonFatalErrorAlert = 1002,
-
- rErrorStrings = 1000, /* Errors */
- kNoFileRoutinesErr = 1,
- kNoAppleEventsErr = 2,
- kNoMenuBarErr = 3,
- kOutOfMemoryErr = 4,
- kCanNotOpenFile = 5,
- kBadPictFile = 6,
- kPrintingErr = 7,
- kAppleEventErr = 8,
- kAppleEventInitErr = 9,
- kGotOAPP = 10,
- kGotODOC = 11,
- kGotPDOC = 12,
- kGotQUIT = 13,
-
- rDocumentWindow = 1000 /* Windows */
- };